<?php

use Jialeo\LaravelSchemaExtend\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateUserFaceLogsTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('user_face_logs', function (Blueprint $table) {
            $table->charset = 'utf8';
            $table->collation = 'utf8_general_ci';
            $table->comment = '用户人脸识别记录表';
            $table->increments('id');
            $table->unsignedInteger('user_id')->comment('用户id')->index();
            $table->string('face_id')->comment('face认证id');
            $table->unsignedTinyInteger('status')->comment('认证结果1成功2失败');
            $table->string('confidence')->comment('比对结果置信度');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('user_face_logs');
    }
}
